package com.gxa.common;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @author bq
 * Date: 2020/10/23 10:46
 * Description:
 * Version: V1.0
 */
@Component
@ApiModel(value = "返回分页对象实体")
public class PaginationResult<T> {
    @ApiModelProperty(name = "currentPage",notes = "当前页码",value = "当前页码")
    private int currentPage;//当前页码
    @ApiModelProperty(name = "pageSize",notes = "每页显示条数",value = "每页显示条数")
    private int pageSize;//每页显示条数
    @ApiModelProperty(name = "totalSize",notes = "总条数",value = "总条数")
    private int totalSize;//总条数
    @ApiModelProperty(name = "totalPage",notes = "总页数",value = "总页数")
    private int totalPage;//总页数
    @ApiModelProperty(name = "data",notes = "数据",value = "数据")
    private T data;//数据

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(int totalSize) {
        this.totalSize = totalSize;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "PaginationResult{" +
                "currentPage=" + currentPage +
                ", pageSize=" + pageSize +
                ", totalSize=" + totalSize +
                ", totalPage=" + totalPage +
                ", data=" + data +
                '}';
    }
}
